import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'

import MuseUI from 'muse-ui'
Vue.use(MuseUI)

import iView from 'iview';
Vue.use(iView);

import theme from 'muse-ui/lib/theme';
theme.add('advance', {
	primary: '#272727',
	secondary: '#ff4081',
	success: '#4caf50',
	warning: '#fdd835',
	info: '#2196f3',
	error: '#f44336',
	track: '#bdbdbd',
	text: {
		primary: 'rgba(0, 0, 0, 0.87)',
		secondary: 'gba(0, 0, 0, 0.54)',
		alternate: '#fff',
		disabled: 'rgba(0, 0, 0, 0.38)',
		hint: 'rgba(0, 0, 0, 0.38)' // 提示文字颜色
	},
	divider: 'rgba(0, 0, 0, 0.12)',
	background: {
		paper: '#fff',
		chip: '#e0e0e0',
		default: '#fafafa'
	}
}, 'light');
theme.addCreateTheme((theme) => {
	return `
    .mu-bottom-item-active {
      color: ${theme.text.primary}
    }
    `;
});
theme.use('advance');

import axios from 'axios'
Vue.prototype.axios = axios
axios.defaults.baseURL = ENV.hosturl

import alertify from 'alertify.js'
Vue.prototype.alertify = alertify

import helpers from './helpers'
Vue.use(helpers)

Vue.config.productionTip = false

// 全局路由操作绑定
window.router = router

new Vue({
	router,
	store,
	render: h => h(App),
	data: {
		eventHub: new Vue()
	}
}).$mount('#app')
